package com.example.demo.controller;

import com.example.demo.properties.GirlProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * Created by wangbing on 2018/3/26.
 */
@RestController
public class HelloController {
    @Autowired
    private GirlProperties girlProperties;

//    @RequestMapping(value = {"/hello/{id}","/hehe"},method = RequestMethod.GET)
//    public String say(@PathVariable("id") Integer id){
//        return "id:"+id;
//    }
//@RequestMapping(value = {"/hello","/hehe"},method = RequestMethod.GET)
@GetMapping
public String say(@RequestParam(value = "id",defaultValue = "10",required = false) Integer idddd){
    return "id:"+idddd;
}



//    /**
//     * 通过注解将yml配置文件注入到属性变量中
//     */
//    @Value("${cupSize}")
//    private String cupSize;
//
//    @Value("${age}")
//    private Integer age;
//
//    @Value("${content}")
//    private String content;

//    @RequestMapping(value = "/hello",method = RequestMethod.GET)
//    public String say(){
//        return content;
//    }


}
